
package me.zhengjie.service;

import me.zhengjie.domain.AppMessage;
import me.zhengjie.service.dto.AppMessageDto;
import me.zhengjie.service.dto.AppMessageQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @website https://el-admin.vip
* @description 服务接口
* @author IQW
* @date 2022-07-18
**/
public interface AppMessageService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(AppMessageQueryCriteria criteria, Pageable pageable);

    Map<String,Object> queryAllApi(AppMessageQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<AppMessageDto>
    */
    List<AppMessageDto> queryAll(AppMessageQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param msgId ID
     * @return AppMessageDto
     */
    AppMessageDto findById(Integer msgId);

    /**
    * 创建
    * @param resources /
    * @return AppMessageDto
    */
    AppMessageDto create(AppMessage resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(AppMessage resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Integer[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<AppMessageDto> all, HttpServletResponse response) throws IOException;
}